package fag.core.game.space;

import fag.core.game.StandardDoodad;
import fag.core.game.Transformable.Referential;
import fag.core.geometry.Vector2D;

public class Meteorite extends StandardDoodad {

	public Vector2D speed = new Vector2D(Math.random() * 500, Math.random() * 500);
	
	public Meteorite() {
		super(new MeteoriteModel());
	}
	
	public void bounce(Vector2D normal) {
		speed = speed.add(normal.mul(normal.dot(speed.mul(-1)) * 2));
	}
	
	public void step(double dt) {
		translate(speed.x * dt/5, speed.y * dt, Referential.ABSOLUTE);
	}
	
}
